<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">

<head>
    <!--<title th:text="${pageTitle}"></title>-->
    <div data-th-replace="layout/head-top"></div>
</head>
<body>
<div class="ibox-content clearfix pt10">
    <div class="form-horizontal">
        <form id="update-subject-form">
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">
                    <i class="c-red">*</i> 专业/科目名
                </label>
                <div class="col-sm-8">
                    <input type="hidden" th:value="${subject['id']}" th:default="0" name="id"/>
                    <input type="hidden" th:value="${subject['parentId']}" th:default="0" name="parentId"/>
                    <input type="text" class="form-control validate-data" th:value="${subject['subjectName']}" name="subjectName"/>
                    <span class="help-block m-b-none c-999">专业/科目名，限30个字以内</span>
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">
                    <i class="c-red">*</i> 专业/科目状态
                </label>
                <div class="col-sm-8">
                    <select name="status" class="form-control mb10  validate-data">
                        <option th:selected="${subject['status']}==1" value="1">正常</option>
                        <option th:selected="${subject['status']}==2" value="2">禁用</option>
                    </select>
                    <span class="help-block m-b-none c-999">专业/科目状态，默认是正常状态，禁用状态的专业/科目在前端不显示</span>
                </div>
            </div>
            <div class="hr-line-dashed"></div>
            <div class="form-group">
                <label class="col-sm-2 control-label text-right">专业/科目描述</label>
                <div class="col-sm-8">
                    <textarea aria-required="true" style="height: 155px;resize: none;" class="form-control" name="depict" th:text="${subject['depict']}"></textarea>
                    <span class="help-block m-b-none c-999">专业/科目描述是对于该专业/科目的具体说明，限255个字以内</span>
                </div>
            </div>
            <div class="hr-line-dashed recommend" th:if="${subject['parentId']==0}"></div>
            <div class="form-group recommend" th:if="${subject['parentId']==0}">
                <label class="col-sm-2 control-label"> 推荐位置一</label>&nbsp;&nbsp;&nbsp;
                <div class="col-sm-8">
                    <input class="placeKey" type="hidden" name="placeKeyOne" th:value="${#strings.isEmpty(subject['placeKeys'])} ? '' : ${#strings.setSplit(subject['placeKeys'],',')[0]}"/>
                    <div class="checkbox i-checks">
                        <label style="padding: 0"><input class="i-checks" type="checkbox" value="AHTS"  />移动端-首页banner底部专业推荐位</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <!--<label style="padding: 0"><input class="i-checks" type="checkbox" value="AHBSC"  />App-首页底部专业课程推荐</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-->
                        <div>
                            <span class="help-block m-b-none c-999">此推荐为：h5，安卓，ios，小程序等 各端 首页banner 底部 第二屏位置，最多推荐显示7个常用热门专业。推荐之前，请按要求上传此专业对应的图标</span>
                        </div>
                    </div>
                    <div id="subject-image" class="pt10" style="display: none">
                        <div class="form-group" th:if="${subject['parentId']==0}">
                            <div class="col-sm-12">
                                <input type="hidden" th:value="${subject['imageJson']}" name="imageJson"/>
                                <p>
                                    <button class="btn btn-primary " type="button" id="subjectImage"><i class="fa fa-image"></i>&nbsp;上传图标</button>
                                    <span class="c-red">&nbsp;*&nbsp;必传项（如推荐此专业，专业对应图标为必传项）</span>
                                </p>
                                <div class="clearfix" id="coverImage">
                                    <div class="file-box">
                                        <div class="file">
                                            <span class="corner" title="删除" id="remove-image"><i class="fa fa-remove"></i></span>
                                            <div class="image">
                                                <img alt="专业图标" id="material-image" class="img-responsive" th:src="!${#maps.isEmpty(subject['imageMap'])} ? ${subject['imageMap']['url']} : ''"/>
                                            </div>
                                            <div class="file-name">
                                                <p id="file-names" th:text="!${#maps.isEmpty(subject['imageMap'])} and ${subject['imageMap']['fileName']}!=null ? ${subject['imageMap']['fileName']}:'文件名'"></p>
                                                <small id="create-time" th:text="!${#maps.isEmpty(subject['imageMap'])} and ${subject['imageMap']['createTime']}!=null ? ${subject['imageMap']['createTime']}:'上传时间'"></small>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <span class="help-block m-b-none c-red">* 为保证正常显示，专业图标尺寸要求：98px*98px的png背景透明图标</span>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
          <!--  <div class="hr-line-dashed recommend" th:if="${subject['parentId']==0}"></div>
            <div class="form-group recommend" th:if="${subject['parentId']==0}">
                <label class="col-sm-2 control-label"> 推荐位置二</label>&nbsp;&nbsp;&nbsp;
                <div class="col-sm-8">
                    <input class="placeKey" type="hidden" name="placeKeyTwo" th:value="${#strings.isEmpty(subject['placeKeys'])} ? '' : (${#arrays.length(#strings.setSplit(subject['placeKeys'],','))} < 2 ? '' : ${#strings.setSplit(subject['placeKeys'],',')[1]})"/>
                    <div class="checkbox i-checks">
                        &lt;!&ndash;<label style="padding: 0"><input class="i-checks" type="checkbox" value="AHTS"  />App-首页顶部专业推荐</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&ndash;&gt;
                        <label style="padding: 0"><input class="i-checks" type="checkbox" value="AHBSC"  />移动端-首页专业课程推荐位</label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                        <div>
                            <span class="help-block m-b-none c-999">此推荐为：h5，安卓，ios，小程序等 各端 首页大专业课程的推荐。勾选即在 各端首页显示此专业及所属的课程</span>
                        </div>
                    </div>
                </div>
            </div>-->

        </form>
    </div>
</div>
<div data-th-replace="layout/head-footer"></div>
<script type="text/javascript" th:src="@{{path}/admin/libs/plugins/layer/laydate/laydate.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/upload/common-webuploader.js?v={v}(path=${staticPath},v=${v})}"></script>
<script type="text/javascript" th:src="@{{path}/admin/business/manage/subject/save-subject.js?v={v}(path=${staticPath},v=${v})}"></script>
</body>
</html>
